<?php
namespace app\personal\controller;
use think\Controller;
use think\Db;
use think\Session;

class Theme extends Controller
{
    public function index()
    {
        if(empty(Session::get('id'))){
            $this->error('请先登录账号...','./login/index');
        } else {
            // $id = Session::get('id');
            $id = input('uid');
            echo $id;
            $list = Db::table('user_info')->where('uid',$id)->find();

            //在帖子表中查询贴子的信息
            $note = Db::table('note')->where('uid',$id)->select();
            var_dump($note);
            var_dump($list);
            $this->assign('list',$list);
            $this->assign('note',$note);


            return $this->fetch('index/theme');
        }
        
    }
}
